<template>
  <div id="app">
    <div class="topMenu">
      <div class="itemList" style="float: right">
        <div
          class="item"
          @click="goPage(item)"
          v-for="(item, idx) in routerList"
          :key="idx"
        >
          {{ item.meta }}
        </div>
      </div>
    </div>

    <router-view></router-view>
  </div>
</template>

<script>
// 引入路由
import { routerList } from "./router/routes";
export default {
  name: "App",
  data() {
    return {
      routerList,
    };
  },
  mounted() {
    this.$router.push({
      path: "/",
    });
  },
  methods: {
    goPage(item) {
      this.$router.push({
        path: item.path,
      });
    },
  },
};
</script>

<style>
html body {
  width: 100%;
  height: 100%;
}
* {
  margin: 0;
  padding: 0;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  overflow: hidden;
  height: 100vh;
}
@keyframes testHue {
  from {
    filter: hue-rotate(0deg);
  }
  to {
    filter: hue-rotate(360deg);
  }
}
/* 公共渐变颜色 */
.gradientColor {
  background-image: linear-gradient(
    130deg,
    rgba(0, 0, 0, 0.505),
    rgb(57, 214, 26)
  );
  font-size: 30px;
  font-weight: 700;
  background-clip: text;
  color: transparent;
  animation: testHue 5s infinite;
}

.container {
  width: 100%;
  padding: 10px;
  height: 100%;
  position: relative;
}

/* 顶部菜单一级导航 */
.topMenu {
  width: 100%;
  height: 60px;
  background-image: url("./assets/topheader.gif");
  background-size: 620px 90px;
  /* background-repeat: no-repeat; */
  /* background-image: linear-gradient(130deg, rgba(34, 90, 232, 0.505), rgb(57, 214, 26)); */
  /* background-clip:text; */
  /* color: transparent; */
}
.topMenu .itemList {
  display: flex;
  justify-content: space-around;
  align-items: center;
  position: relative;
}
.topMenu .item {
  width: 150px;
  line-height: 60px;
  color: aqua;
  margin: 0 10px;
  position: relative;
  text-align: center;
  background-image: linear-gradient(
    130deg,
    rgba(0, 0, 0, 0.505),
    rgb(57, 214, 26)
  );
  font-size: 30px;
  font-weight: 700;
  background-clip: text;
  color: transparent;
  animation: testHue 5s infinite;
}
.topMenu .item::after {
  content: "";
  position: absolute;
  bottom: 10px;
  left: 0;
  width: 150px;
  height: 4px;
  /* background-color: aqua; */
  background-image: linear-gradient(
    130deg,
    rgba(34, 90, 232, 0.505),
    rgb(57, 214, 26)
  );
  border-radius: 50%;
}
</style>
